<html>
<head><meta charset="utf-8"><title>Index and ?Sized · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html">Index and ?Sized</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203673266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203673266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203673266">(Jul 13 2020 at 02:47)</a>:</h4>
<p>So the docs on Index state that it's Output associated type can be either ?Sized. IndexMut uses this type, and even provides an assignment desugaring *container.index_mut(index). However, this doesn't compile Link: <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=90c59b57404d100e807dd3fb2b8c06cd">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=90c59b57404d100e807dd3fb2b8c06cd</a> without explicit Sized bounds, which means there's likely compiler magic at play. Is there a a way I can do what I'm trying to do in lines 10-12?</p>



<a name="203674199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674199">(Jul 13 2020 at 03:13)</a>:</h4>
<p><span class="user-mention" data-user-id="303115">@Quy Nguyen</span> you can't assign unsized values, because they might not of the same static type</p>



<a name="203674204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674204">(Jul 13 2020 at 03:13)</a>:</h4>
<p>e.g. two <code>dyn Debug</code> might be <code>i32</code> vs <code>String</code></p>



<a name="203674205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674205">(Jul 13 2020 at 03:13)</a>:</h4>
<p>what you want is have <em>the default</em> be bounded by <code>Self::Output</code> being <code>Sized</code></p>



<a name="203674278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674278">(Jul 13 2020 at 03:15)</a>:</h4>
<p><span class="user-mention" data-user-id="303115">@Quy Nguyen</span> this is the only way I know to make it work <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=a7d56db24a2be5fbd751f537e7ea0314">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=a7d56db24a2be5fbd751f537e7ea0314</a></p>



<a name="203674353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674353">(Jul 13 2020 at 03:17)</a>:</h4>
<p>this would allow an <code>impl</code> of <code>IndexMut</code> to support <code>Output</code> being e.g. a slice, and asserting that the lengths are equal (or even overwrite the minimum number of elements between <code>self[index]</code> and <code>value</code> etc.)</p>



<a name="203674397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674397">(Jul 13 2020 at 03:18)</a>:</h4>
<p>(for <code>dyn Trait</code> in general it's impossible to do assignment, because it's impossible to check for type equality at runtime soundly, only e.g. <code>dyn Any</code> and similar can)</p>



<a name="203674400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674400">(Jul 13 2020 at 03:18)</a>:</h4>
<p>(through the combination of <code>'static</code> bounds and <code>TypeId</code>)</p>



<a name="203674413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674413">(Jul 13 2020 at 03:19)</a>:</h4>
<p>I see. Relying on specialization is a bummer, and it doesn't look like <code>min_specialization</code> has the default impl stuff.</p>



<a name="203674428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674428">(Jul 13 2020 at 03:19)</a>:</h4>
<p>Any idea for why the IndexGet impl wouldn't work?</p>



<a name="203674432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674432">(Jul 13 2020 at 03:19)</a>:</h4>
<p>Intuitively it just forwards the Index impl so it should work, but I'm not sure how to convince the compiler of that</p>



<a name="203674489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674489">(Jul 13 2020 at 03:21)</a>:</h4>
<p><span class="user-mention" data-user-id="303115">@Quy Nguyen</span> last I checked GATs are not implemented</p>



<a name="203674499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674499">(Jul 13 2020 at 03:21)</a>:</h4>
<p>it's not like they couldn't have been, but some problems were punted on, I think?</p>



<a name="203674502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674502">(Jul 13 2020 at 03:21)</a>:</h4>
<p>(instead of doing the hacky thing to make them work)</p>



<a name="203674544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674544">(Jul 13 2020 at 03:22)</a>:</h4>
<p>Not implemented as in for this case?</p>



<a name="203674547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674547">(Jul 13 2020 at 03:22)</a>:</h4>
<p>not implemented beyond syntax, I guess?</p>



<a name="203674555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674555">(Jul 13 2020 at 03:22)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="116009">@nikomatsakis</span> maybe I'm just entirely wrong and behind the times</p>



<a name="203674582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674582">(Jul 13 2020 at 03:23)</a>:</h4>
<p>oh wait the error is just a normal lifetime error, you're missing a bound</p>



<a name="203674625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674625">(Jul 13 2020 at 03:24)</a>:</h4>
<p>The problem is I can't place the bound anywhere</p>



<a name="203674630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674630">(Jul 13 2020 at 03:24)</a>:</h4>
<p>yeah I have no idea how this is supposed to work</p>



<a name="203674635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674635">(Jul 13 2020 at 03:24)</a>:</h4>
<p>ftr you don't need GATs to do this kind of trait</p>



<a name="203674637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674637">(Jul 13 2020 at 03:24)</a>:</h4>
<p>Because GATs don't support where clauses and I nothing I did with HRTBs worked</p>



<a name="203674646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674646">(Jul 13 2020 at 03:24)</a>:</h4>
<p>GATs just make it palatable</p>



<a name="203674664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674664">(Jul 13 2020 at 03:25)</a>:</h4>
<p>You're referring to putting the lifetime in the generics?</p>



<a name="203674718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674718">(Jul 13 2020 at 03:26)</a>:</h4>
<p>I didn't want to do that because that just seems like a workaround</p>



<a name="203674725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674725">(Jul 13 2020 at 03:26)</a>:</h4>
<p>And it would hurt the normal by-value case</p>



<a name="203674736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674736">(Jul 13 2020 at 03:26)</a>:</h4>
<p>yes but GATs are pretty far out AFAIK</p>



<a name="203674824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203674824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203674824">(Jul 13 2020 at 03:28)</a>:</h4>
<p>so yeah it definitely works when not using GATs <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=d91cbab369f65716776e56939583269c">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=d91cbab369f65716776e56939583269c</a></p>



<a name="203675150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203675150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203675150">(Jul 13 2020 at 03:38)</a>:</h4>
<p>Ye that kind of sucks. Last time someone proposed a trait similar to yours on Internals it got punted to HKTs :/</p>



<a name="203675200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203675200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203675200">(Jul 13 2020 at 03:38)</a>:</h4>
<p>Might just RFC the IndexSet stuff, which seems achievable in today's Rust</p>



<a name="203675202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203675202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203675202">(Jul 13 2020 at 03:38)</a>:</h4>
<p>And would unlock <code>map[key]=value</code> syntax while being open</p>



<a name="203675256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203675256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203675256">(Jul 13 2020 at 03:40)</a>:</h4>
<p>I'm also guessing GATs are completely nontrivial to contribute to?</p>



<a name="203677038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203677038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203677038">(Jul 13 2020 at 04:33)</a>:</h4>
<p>see <a class="stream" data-stream-id="144729" href="/#narrow/stream/144729-wg-traits">#wg-traits</a>, I don't really know, never got involved with it</p>



<a name="203677041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203677041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203677041">(Jul 13 2020 at 04:33)</a>:</h4>
<p>presumably blocked on Chalk</p>



<a name="203725104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203725104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203725104">(Jul 13 2020 at 14:55)</a>:</h4>
<p>Do we currently allow <code>container[key]=value</code> anywhere when <code>Index::Output</code> is <code>!Sized</code>? Default impls are still solely in the land of specialization, but restricting the set method to <code>Sized</code> might restrict future DST work.</p>



<a name="203779702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203779702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203779702">(Jul 13 2020 at 22:33)</a>:</h4>
<p><span class="user-mention" data-user-id="303115">@Quy Nguyen</span> no, because assignment can't work with <code>!Sized</code> values, like I previously explained</p>



<a name="203779711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203779711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203779711">(Jul 13 2020 at 22:33)</a>:</h4>
<p>for the same reason your code wouldn't compile</p>



<a name="203784139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203784139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203784139">(Jul 13 2020 at 23:37)</a>:</h4>
<p>Sorry, meant to ask would/should. I'm not up to date on all the unsized proposals.</p>



<a name="203788730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203788730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203788730">(Jul 14 2020 at 00:52)</a>:</h4>
<p><span class="user-mention" data-user-id="303115">@Quy Nguyen</span> no, it's fundamentally impossible</p>



<a name="203788749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Index%20and%20%3FSized/near/203788749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Index.20and.20.3FSized.html#203788749">(Jul 14 2020 at 00:52)</a>:</h4>
<p>at most maybe for slices but then you still have to deal with the length being potentially different</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>